const path = require('path')

module.exports = {
    runtimeCompiler: true,
    // publicPath:'/',
    devServer: {
        proxy: {
            '/api': {
                target: 'http://47.96.255.222:8080/jeecg-boot/', // 黄
                changeOrigin: true,
                pathRewrite: { // 重写路径
                    '^/api': ''
                }
            },
        },
    },
    pluginOptions: {
        'style-resources-loader': {
            patterns: [
                path.resolve(__dirname, './assets/css/*.scss')
            ],
            preProcessor: 'scss'
        }
    },
    css: {
        // 向所有 Sass 样式传入共享的全局变量：
        loaderOptions: {
            sass: {
                // @/ 是 src/ 的别名
                prependData: `@import "~@/assets/css/base.scss";`
            }
        }
    }
}